package com.rayson.oneapi.util;

import org.springframework.util.StringUtils;

import java.util.UUID;

/**
 * Author: rayson
 * Description:
 * Version: 1.0
 * Date: 2024-09-03 19:46
 */
public class StringUtil extends StringUtils {

    /**
     * 获取随机的字符串
     *
     * @param length 字符串的长度
     * @return 随机字符串
     */
    public static String randomStr(int length) {
        return UUID.randomUUID().toString().replace("-", "").substring(0, length);
    }
}
